Moves the camera forward (negative is back) and to its right (negative is left) by that many pixels, stopping at walls. True when it moved at all.
Game Boy: not available
Game Boy Color: not available
On other consoles this differs: see Side by side and How the consoles differ.
view3d_move(forward, side) -> bool| Name | Type |
|---|---|
forward | real |
side | real |
bool
Moves the camera forward pixels the way it faces (a negative number moves back) and side pixels to its right (a negative number moves left), stopping at walls. It answers true when the camera moved at all.
The two directions are tried one after the other, so the camera slides along a wall instead of sticking to it. Walls are the solid tiles and the edges of the room, kept view3d_radius pixels away.
Call it once a frame with the speed you want, in pixels per frame. 1.5 is a walk.
// Step event: up and down walk, left and right turn.
if (action_held(up)) { view3d_move(1.5, 0); }
if (action_held(down)) { view3d_move(-1.5, 0); }
if (action_held(left)) { view3d_turn(3); }
if (action_held(right)) { view3d_turn(-3); }The camera walks and turns, and stops at every wall.
The two directions are tried one after the other, so the camera slides along a wall instead of sticking to it. Call it once a frame with the speed you want in pixels per frame, for example view3d_move(1.5, 0). Walls are the solid tiles and the edges of the room.